]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: ignore APs that hide their SSID
authorRui Matos <tiagomatos@gmail.com>
Wed, 3 Aug 2011 17:32:03 +0000 (18:32 +0100)
committerRui Matos <tiagomatos@gmail.com>
Fri, 12 Aug 2011 16:26:53 +0000 (17:26 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=654898

js/ui/status/network.js

index 4b4aaac632aa74b29826c431c68d5b806ea5d3bd..341f9b0e82e48bac3005bb4f431135f8602e92e2 100644 (file)
@@ -991,7 +991,11 @@ NMDeviceWireless.prototype = {
                 obj = this._networks[pos];
                 obj.accessPoints.push(ap);
             } else {
-                obj = { ssid: ap.get_ssid(),
+                let ssid = ap.get_ssid();
+                if (ssid == null)
+                    continue;
+
+                obj = { ssid: ssid,
                         mode: ap.mode,
                         security: this._getApSecurityType(ap),
                         connections: [ ],
@@ -1190,8 +1194,13 @@ NMDeviceWireless.prototype = {
     _accessPointAdded: function(device, accessPoint) {
         let pos = this._findNetwork(accessPoint);
         let apObj;
+        let ssid;
         let needsupdate = false;
 
+        ssid = accessPoint.get_ssid();
+        if (ssid == null)
+            return;
+
         if (pos != -1) {
             apObj = this._networks[pos];
             if (apObj.accessPoints.indexOf(accessPoint) != -1) {
@@ -1203,7 +1212,7 @@ NMDeviceWireless.prototype = {
             if (apObj.item)
                 apObj.item.updateAccessPoints(apObj.accessPoints);
         } else {
-            apObj = { ssid: accessPoint.get_ssid(),
+            apObj = { ssid: ssid,
                       mode: accessPoint.mode,
                       security: this._getApSecurityType(accessPoint),
                       connections: [ ],